package com.ruoyi.im.mongo.dao;

import com.mongodb.client.result.UpdateResult;
import com.ruoyi.im.mongo.domain.po.ImMongoMessagePO;
import org.bson.types.ObjectId;

import java.util.List;

public interface ImMongoMessageDao {
    ImMongoMessagePO saveMessage(ImMongoMessagePO message);

    UpdateResult updateMessageState(ObjectId fromUserId, Integer state);

    ImMongoMessagePO getById(ObjectId id);

    List<ImMongoMessagePO> getByGtNum(String roomId, String num);

    List<ImMongoMessagePO> getByRoomId(String roomId);

    ImMongoMessagePO maxNumByChatListId(ObjectId chatListId);
}
